<!-- 订单主页 -->
<template>
    <!-- position: sticky; top: 0;z-index: 999; -->
    <!-- fixed="true" -->
    <div>
        <div class="van-head">
            <van-config-provider :theme-vars="themeVars">
                <van-nav-bar
                title="我的订单"
                left-arrow
                :border="false"
                fixed="true"
                style=" background-color: #eae9e5 ;"
                @click-left="onClickLeft"
                />
                <div style=" height: 30px;"></div>
                <van-tabs v-model:active="activeName" background="#eae9e5" title-inactive-color="black" title-active-color="#c1ab96" color="#c1ab96">
                    <div style=" height: 42px;"></div>
                    <van-tab title="全部" name="1"><body1></body1></van-tab>
                    <van-tab title="待付款" name="2"><body2></body2></van-tab>
                    <van-tab title="待发货" name="3"><body3></body3></van-tab>
                    <van-tab title="待收货" name="4"><body4></body4></van-tab>
                    <van-tab title="待评价" name="5"><body5></body5></van-tab>
                </van-tabs>
            </van-config-provider>
        </div>
    </div>
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import {useRoute,useRouter} from 'vue-router';
const route = useRoute();
const router = useRouter();
let numye:any = ref('1')
const activeName = ref(numye.value);
onMounted(()=>{    

    if(route.query.ye){
        activeName.value = route.query.ye;
        // console.log( activeName.value);
        
    }else{
        router.push('/home');
    }
})
import body1 from './odredbox/all.vue';
import body2 from './odredbox/NotPayment.vue';
import body3 from './odredbox/NotCargo.vue';
import body4 from './odredbox/NotReceived.vue';
import body5 from './odredbox/NotEvaluation.vue';
    const onClickLeft = () => history.back();
    const themeVars = {
        NavBarIconColor:'#c1ab96'
    };
</script>
<style>
    .van-tabs__wrap{
        position: fixed;
        width: 100%;
        z-index: 999;
    }
</style>